From d88c2b9e63c97fecb5d7edef8b6706a217c227ec Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 31 May 1993 19:04:20 +0000 Subject: [PATCH] (update_frame): Make preempt_count positive. Defend against negative baud_rate. --- src/dispnew.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dispnew.c b/src/dispnew.c index e9c7521494a..a5f35362f1c 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -955,6 +955,9 @@ update_frame (f, force, inhibit_hairy_id) register int downto, leftmost; #endif + if (preempt_count <= 0) + preempt_count = 1; + if (FRAME_HEIGHT (f) == 0) abort (); /* Some bug zeros some core */ detect_input_pending (); @@ -1025,7 +1028,8 @@ update_frame (f, force, inhibit_hairy_id) outq = PENDING_OUTPUT_COUNT (stdout); #endif outq *= 10; - sleep (outq / baud_rate); + if (baud_rate > 0) + sleep (outq / baud_rate); } } if ((i - 1) % preempt_count == 0) -- 2.30.2